﻿<UserControl x:Class="FaceFusion.Views.ImageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:views="clr-namespace:FaceFusion.Views"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="300">
    <Viewbox Stretch="Uniform">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="5" />
                <ColumnDefinition />
                <ColumnDefinition Width="5" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="5" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid Grid.Column="0"
                  Grid.Row="0">
                <Image Source="{Binding FusionManager.ResidualImage}" />
                <Image Source="{Binding ColorImage}"
                       Visibility="{Binding ShowRGBOverlay, Converter={StaticResource BooleanToVisibility}}" />
            </Grid>
            <Grid Grid.Column="0"
                  Grid.Row="2">
                <Image x:Name="depthImage"
                       Source="{Binding DepthImage}" />
                <!--<Image Source="{Binding ColorImage}"
                       Visibility="{Binding ShowRGBOverlay, Converter={StaticResource BooleanToVisibility}}"
                       Opacity="0.5" />-->
                <!--<Image Source="{Binding FusionInputImage}"
                       Opacity="0.5" />-->
                <views:SkeletonJointView DataContext="{Binding SkeletonJointVM}"
                                         Width="{Binding ActualWidth, ElementName=depthImage}"
                                         Height="{Binding actualHeight, ElementName=depthImage}" />
            </Grid>
            <Grid Grid.Column="2"
                  Grid.Row="0">
                <!--<Image Source="{Binding FusionInputImage}" />
                <Viewbox Stretch="Uniform">
                    <views:FaceTrackingView DataContext="{Binding FaceTrackingVM}" />
                </Viewbox>-->
            </Grid>
            <Grid Grid.Column="2"
                  Grid.Row="0"
                  Grid.ColumnSpan="3"
                  Grid.RowSpan="3">
                <Image Source="{Binding FusionManager.FusionOutputImage}" />
                <Image Source="{Binding ColorImage}"
                       Visibility="{Binding ShowRGBOverlay, Converter={StaticResource BooleanToVisibility}}"
                       Opacity="1.0" />
                <Image Source="{Binding FusionManager.FusionOutputImage}"
                       Opacity="0.5"
                       Visibility="{Binding ShowRGBOverlay, Converter={StaticResource BooleanToVisibility}}" />
            </Grid>
            <Grid Grid.Column="4"
                  Grid.Row="0">
                <!--<Image Source="{Binding FusionManager.ResidualImage}" />-->
            </Grid>
        </Grid>
    </Viewbox>
</UserControl>
